import { XrequestInstance } from "@/utils/request"

import { ILoginParams, ILoginData } from "../type"
export function login(params: ILoginParams) {
  return XrequestInstance.request<ILoginData>({
    url: "/login",
    method: "get",
    params,
    repeatRequest: true //是否需要取消请求这一个需求，需要则为true
  })
}

export function getRoute(params) {
  return XrequestInstance.request({
    url: "/route",
    method: "get",
    params
  })
}

export function getUserInfo(data) {
  return XrequestInstance.request({
    url: "/userinfo",
    method: "post",
    data
  })
}
